package com.job.shuang.HomeWork0702;

import netscape.security.ForbiddenTargetException;

/**
 * @author Shuang
 * @version 1.0
 * @since 2022-07-02 21:00:20
 */
public class MyToolXuanze0702 {
    public static void main(String[] args) {
        int[] arr = {20,22,7,2,21,97};
        for (int t = 0;t < arr.length-1 ; t++){//外循环 次数
            for (int i = 0;i<arr.length-1-t;i++){
                if (arr[t]<arr[i]){//降序选择排序
                    int temp = arr[i];
                    arr[i]=arr[t];
                    arr[t]=temp;
                }
            }
        }
        for (int i:arr){
            System.out.print(i+"\t");//打印
        }
    }
}
